/**
 * 
 */
package com.jm.web;

import com.jm.utils.StringBuilderEx;

/**
 * @author yanjie
 *
 * 2011/9/24 上午11:16:59
 */
public class FormPage extends BaseDAPage{
	@Override
	protected void OnLoad() {
		StringBuilderEx sb = new StringBuilderEx();
		sb.Append("$P.setDefaultAction('save');");
		this.RegisterOnReadyScript(SCRIPTRUN_REALTIME, sb.toString());
		
//		sb.Reset();
//		sb.Append("$('#action').val('search');");
//		this.RegisterOnReadyScript(SCRIPTRUN_ONREADY, sb.toString());
		
		//設置表格頁面默認有哪些按鈕默認啟用
		this.getBtnDisabledConfig().put("save", false);
		this.getBtnDisabledConfig().put("delete", false);
		super.OnLoad();
	}
	
	@Override
	public String outputHiddenItem() {
		StringBuilderEx sb = new StringBuilderEx();
		sb.Append(super.outputHiddenItem());
		sb.Append("\r\n<input type=\"hidden\" id=\"pagetype\" name=\"pagetype\" value=\"form\" />");
		return sb.toString();
	}
}
